package com.tao.loopdemo;

import java.util.Scanner;

public class LoopDemo3 {
    public static void main(String[] args) {
        // 输入一个正整数n
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int num = 0;
        for (int i = 1; i <= n; i++) {
            if(i % 2 == 0){
                num++;
                System.out.print(i + " ");
            }
        }
        System.out.println();
        System.out.println("有" + num + "个偶数");
    }
}
